﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.SystemUI;
using ESRI.ArcGIS.Display;
using System.Collections.Specialized;
using PlanningGIS.Util.Log;

namespace PlanningGIS.Framework
{
    /// <summary>
    /// 基础系统应用程序
    /// </summary>
    [Guid("6a759f52-67f4-4d83-8cb1-fdca33326592")]
    public interface IApplication
    {
        /// <summary>
        /// 获取系统名称
        /// </summary>
        string Name { get; }

        /// <summary>
        /// 获取或设置系统标题
        /// </summary>
        string Caption { get; set; }

        /// <summary>
        /// 获取或设置当前激活的工具按钮
        /// </summary>
        ICommandItem CurrentTool { get; set; }

        /// <summary>
        /// 获取当前的地图文档
        /// </summary>
        IDocument Document { get; }

        /// <summary>
        /// 获取当前的操作堆栈
        /// </summary>
        IOperationStack OperationStack { get; }        

        /// <summary>
        /// 获取状态栏信息
        /// </summary>
        IStatusBar StatusBar { get; }

        /// <summary>
        /// 新建工作区
        /// </summary>
        /// <param name="selectTemplate">是否选择模版</param>
        /// <param name="templatePath">模版路径</param>
        void NewDocument(bool selectTemplate, string templatePath);

        /// <summary>
        /// 打开工作区
        /// </summary>
        /// <param name="path">工作区路径</param>
        void OpenDocument(string path);

        /// <summary>
        /// 另存工作区
        /// </summary>
        /// <param name="saveAsPath">工作区路径</param>
        void SaveAsDocument(string saveAsPath);

        /// <summary>
        /// 保存工作区
        /// </summary>
        /// <param name="saveAsPath">工作区路径</param>
        void SaveDocument(string saveAsPath);

        /// <summary>
        /// 改变当前地图
        /// </summary>
        /// <param name="name">地图名称，名称需要在当前模板中存在</param>
        void ChangeMap(string name);

        /// <summary>
        /// 退出
        /// </summary>
        void Shutdown();       
        
    }
}